The present invention relates to a technology used at optically measuring a distance, and particularly to a distance measuring apparatus and an image input apparatus.
In order to obtain information on a three-dimensional shape and a position of an object in an image from the image taken by a camera, apparatuses for measuring a distance from the camera to each point in the image have been proposed and commercially available.
As one of the methods of obtaining a distance using an image, there are proposed various kinds of methods of measuring a distance using a relation between blur caused by a positional relation between a lens and an imaging plane and the distance to a camera target.
Among the above methods, there are proposed some methods which use a relation between magnitudes of blur and distance instead of directly obtaining an in-focus position of the lens. Among these methods, a method proposed by Professor Nayar of Columbia University uses a tele-centric optical system and a double focus camera. Further, in a technology disclosed in Japanese Patent No.2963990, there is proposed a method using a structured coded opening (pupil) in order to make analysis of the blur easy.
As pointed out in Japanese Patent No.2963990, the method proposed by Nayar requires modeling of the lens aberration, precise positioning of the CCD (charge-coupled device) and removing of noise from an obtained image because the method uses a simple circular opening lens. Further, it is difficult to measure an object at a long distant position and to secure depth accuracy because the magnitude of blur is limited to a comparatively small value.
On the other hand, in the method proposed by Japanese Patent No.2963990, a pupil-shaped light passing means for transmitting light is used so as to make the analysis of magnitude of blur easy. Thereby, it is possible to perform distance measurement without occurrence of any problems in the above-mentioned method of Nayar.
In each of the above-mentioned methods, the distance measurement is performed by analyzing blurs in images taken at different focuses. As the means for taking the images at the different focuses, there are proposed a method in which the plurality of different focused images are taken several times by sequentially moving the lens to change the focus and a method in which the plurality of different focused images are taken at a time by dispersing the incident light to n directions using prisms.
In the method by sequentially moving the lens, it is necessary to perform the focus control with high accuracy. On the other hand, in the method by using the prisms, the amount of light in the observed image at each focus becomes 1/n because the incident light is divided into n parts. Accordingly, the amount of charge obtained by the CCD is reduced. Therefore, this method is weak against electron noise, and is difficult to improve the measuring accuracy.
As having been described above, in each of the conventional methods, the requirement to the operating accuracy of the focus control mechanism in the measurement apparatus becomes extremely high. As the result, the satisfaction of the above requirement becomes an important problem for commercially using the measurement apparatus.
An object of the present invention is to provide a distance measuring technology capable of stably and accurately performing distance measurement of an object without any highly accurate focus control mechanism.
In order to solve the above-mentioned problem, a distance measuring apparatus and an image input apparatus using a single-focus camera without any focus control mechanism are proposed.
The apparatus comprises a light passing position restricting means capable of freely changing a light passing position; a lens system for focusing the light passed through the light passing position restricting means; an image taking means for taking in the light focused by the lens system; and a distance calculating means for calculating a distance from an imaging element to an object using the taken-in images.